<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<html:base/>

	<h1>TENDERETE BARATO</h1>
	<div id="login">
		<c:if test="${requestScope.error!=null}">
			<span id="error"><c:out value="${requestScope.error}"/></span>
		</c:if>
		<c:if test="${sessionScope.usuario==null}">
			<form action="../../login.do" method="post">
				<input class="campo" name="usuario" type="text" value="" placeholder="Usuario">
				<input class="campo" name="pass" type="password" value="" placeholder="Contraseña">
				<input class="button" type="submit" name="enviar" value="Entrar">
			</form>
			<p>¿No tienes cuenta? <a href='<c:url value="../../registro.do"/>'>Regístrate</a></p>
		</c:if>
		<c:if test="${sessionScope.usuario!=null }">
			<p>Logueado como <c:out value="${sessionScope.usuario.user}"/></p>
		</c:if>
	</div>